<?php
$pacote = "classes/componentes";
$pathToThis = pathinfo(__FILE__);
$root = substr($pathToThis['dirname'], 0, strlen($pathToThis['dirname']) - strlen($pacote) - 1);

require_once $root."/classes/base/Componente.class.php";

class Rotulo extends Componente {

    function Rotulo($label, $valorInicial = null, $classStyle = "Rotulo") {
    	$this->setLabel($label);
    	if ($valorInicial != null)
    		$this->setValor($valorInicial);
    	else
    		$this->setValor($label);
    	$this->setClassStyle($classStyle);
    }
    
    public function render($nome, $form) {
    	$ret = '<span class="'.$this->getClassStyle().'" id="'.$nome.'" name="'.$nome.'">';
    	$ret .= $this->getLabel();
    	$ret .= "</span>";
    	
    	return $ret;
    }
}
?>